package com.jingdianjichi.auth.common.enums;

import lombok.Getter;

@Getter
public enum IsDeleteFlagEnum {
    DELETED(1,"已删除"),
    UN_DELETED(0,"未删除");


    public int code;
    public String desc;

    IsDeleteFlagEnum(int code, String desc) {
        this.code = code;
        this.desc = desc;
    }

    public static IsDeleteFlagEnum getByCode(int codeVal){
        for(IsDeleteFlagEnum result : IsDeleteFlagEnum.values()){
            if(result.code == codeVal){
                return result;
            }
        }
        return null;
    }
}
